#include<iostream>
#include<vector>
using namespace std;
//add函数
vector<int> add(vector<int> A, vector<int> B)
{
    vector<int> C;
    int t = 0;  //进位量
    for (int i = 0; i < A.size() || i < B.size();i++){
        if(i<A.size()){
            t += A[i];
        }
        if (i < B.size())
        {
            t += B[i];
        }
        C.push_back(t % 10);
        t /= 10;
    }
    // 不要漏了最高位还可以进位  999 + 111 = 1110 不加就是110
    if(t){
        C.push_back(1);
    }
    return C;
}
int main(){
    string a, b;
    cin >> a >> b; // a = "1,2,3,4,5,6"
    vector<int> A, B;
    for (int i = a.size() - 1; i >= 0;i--){
        A.push_back(a[i] - '0');     //反序储存“a”---> A[6] ={6,5,4,3,2,1};
    }
    for (int i = b.size() - 1; i >= 0;i--){
        B.push_back(b[i] - '0');
    }
    // C = A + B;
    auto C = add(A, B);
    //遍历
    for (int i = C.size() - 1; i >= 0;i--){
        printf("%d", C[i]);
    }
    return 0;
}